-- GENERATED SPELL FOR [Grimtotem Naturalist] --


function spell0_7726(pUnit, Event) --@Bear Form,Self--
pUnit:FullCastSpellOnTarget(19030,pUnit)
pUnit:RegisterEvent('Sorts_7726', 0, 1)
end

function spell1_7726(pUnit, Event) --@Demoralizing Roar,Self--
pUnit:FullCastSpellOnTarget(15727,pUnit)
pUnit:RegisterEvent('Sorts_7726', 30276, 1)
end

function spell2_7726(pUnit, Event) --@Maul,n/a--
pUnit:FullCastSpellOnTarget(12161,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7726', 689, 1)
end

function spell3_7726(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(12160,pUnit)
pUnit:RegisterEvent('Sorts_7726', 12000, 1)
end

function spell4_7726(pUnit, Event) --@Wrath,n/a--
pUnit:FullCastSpellOnTarget(9739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7726', 2000, 1)
end

function Sorts_7726(pUnit, Event)
local choix_sorts_7726 = math.random(0, 4)
if choix_sorts_7726 == 0 then
pUnit:RegisterEvent('spell0_7726', 1, 1)
end
if choix_sorts_7726 == 1 then
pUnit:RegisterEvent('spell1_7726', 1, 1)
end
if choix_sorts_7726 == 2 then
pUnit:RegisterEvent('spell2_7726', 1, 1)
end
if choix_sorts_7726 == 3 then
pUnit:RegisterEvent('spell3_7726', 1, 1)
end
if choix_sorts_7726 == 4 then
pUnit:RegisterEvent('spell4_7726', 1, 1)
end
end

function mob7726_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7726', math.random(1500, 3000), 1)
end

function mob7726_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7726_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7726_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7726, 1, 'mob7726_Action')
RegisterUnitEvent(7726, 2, 'mob7726_Leave')
RegisterUnitEvent(7726, 3, 'mob7726_Kill')
RegisterUnitEvent(7726, 4, 'mob7726_Die')
